#!/usr/bin/python
# -*- coding: UTF-8 -*-
# author : bird.zhang@ximalaya.com

import redis

environment = 4

if environment == 1:
    # redis property
    redis_host = "sh-nh-b2-3-m6-redis-9-59"
    redis_port = 6385
    redis_password = "jredis123456"
    redis_db = 2
else:
    # redis property
    redis_host = "192.168.1.174"
    redis_port = 6380
    redis_password = "jredis123456"
    redis_db = 7

# 链接redis数据库
redis_conn = redis.Redis(host=redis_host, port=redis_port, password=redis_password, db=redis_db)
key = redis_conn.randomkey()
value = redis_conn.get(key)

print(key, value)
